﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Top.aspx.cs" Inherits="Portal.Top" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="CSS/style.css" rel="stylesheet" rev="stylesheet" />
    <link href="CSS/global.css" rel="stylesheet" rev="stylesheet" />
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
</head>
<body>
    <form runat="server">
    <div id="header">
        <div id="logo">
        </div>
        <div id="userArea">
            <table>
                <tr>
                    <td align="right" >
                        <span class="kmenu"><a href="#" onmouseover="richContext(this)">快捷菜单<i></i></a>
                        </span><span class="kmenu"><a href="#">帮助 <i></i></a></span>
                        <asp:LinkButton ID="btnLoginOut" CssClass="quitIco ml15" runat="server" OnClientClick="return CheckLoginOut()"
                            OnClick="btnLoginOut_Click">注销</asp:LinkButton>
                    </td>
                    <div id="divSetting" style="display:none;" style="position: absolute; z-index: 1"  onmouseout="CloseOpenDiv()">
                        <ul class="menulist">
                            <asp:Repeater ID="rptSetting" runat="server">
                                <ItemTemplate>
                                    <li>
                                    <input type="image" src="images/fav.jpg" value="" onclick="PersonSetting('<%#Eval("CN_NAME").ToString().Trim() %>','<%#Eval("DICTIONARY_ID").ToString().Trim() %>')" />
                                    <a href="#" onclick='ShowPage(<%#Eval("EXT02") %>)'>
                                        <%#Eval("CN_NAME")%></a></li>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                    </div>
                </tr>
                <tr>
                    <td>
                        <span class="welcomeIco">欢迎<a href="#" class="blue b ml5"><asp:Label ID="lblUser"
                            runat="server" Text=""></asp:Label><i></i></a></span> <span class="date">
                                <asp:Label ID="lblDate" runat="server" Text=""></asp:Label></span>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
<script type="text/javascript">
    function CheckLoginOut() {
        if (confirm("是否确认退出系统？")) {
            return true;
        } else {
            return false;
        }

    }
    var url2 = "../Portal/SettingMain.aspx";
    function ShowPage(url) {
        if (url != null || url != "") {
            window.parent.frames["frmContentInfo"].location.href = url;
        }
        window.parent.frames["frmContentInfo"].location.href = url2;
    }
    var oPopup = window.createPopup();

    function richContext(obj) {
        
        var lefter2 = event.offsetY + 0;
        var topper2 = event.offsetX + 15;
        oPopup.document.body.innerHTML = $("#divSetting")[0].innerHTML;
        oPopup.show(topper2, lefter2, 300, 100, obj);
    }
    function CloseOpenDiv() {

        oPopup.document.thisWin = oPopup;
        oPopup.show(0, 0, 0, 0, document.body);
     }
     var num = 0;
     function PersonSetting(item, value) {
         num += 1;
         $.ajax({
             url: "AjaxPage/PersonSettingPage.aspx?num=" + num + "&item=" + item + "&value=" + value,
             success: function () {
                 alert("添加成功！");
             }
         });
     }

</script>
